package com.youlv.yl.controller;

import com.youlv.yl.dto.MoodLikeDto;
import com.youlv.yl.service.intf.MoodLikeService;
import com.youlv.yl.vo.R;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author fenghe
 * @since 2022-01-15
 */
@RestController
@RequestMapping("/yl/like")
@Api(value = "实现用户点赞的相关操作", tags = "实现用户点赞的相关操作")
@CrossOrigin
public class MoodLikeController {
    @Autowired
    private MoodLikeService service;

    @PostMapping("save.do")
    public R save(@RequestBody MoodLikeDto dao) {
        return service.addLike(dao);
    }

    @GetMapping("all.do")
    public R all(long umid) {
        return service.queryById(umid);
    }
}
